﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace ZC.MUSIC.COMMAND
{
    public class ResourceConvert : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null) return null;
            //TO DO 
            //进行逻辑转换
            int a = (int)value;
            if (a == 1) return "blue";
            else if (a == 2) return "yellow";
            else
            {
                return "red";
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
